<% content_for :title do %>
  <label>Search for word definitions</label>
<% end %>

<% remote_form_for :word, Word.new, :url => search_ajax_word_definitions_path,
                    :loading => "#{update_page {|page| page.show(:progress_bar)}}",
                    :complete => "#{update_page {|page| page.hide(:progress_bar)}}" do |f| %>
  <p>
    <%= f.label :text %>
    <%= text_field_with_auto_complete :word, :text, {}, :indicator => 'progress_bar' %>
  </p>
  
  <p>
    <%= f.submit 'Define' %>
    <span id="progress_bar" style="display:none;">
      <%= image_tag('progress_bar.gif', :border => 0, :width => 120) %>
    </span>
  </p>
<% end %>

<div id="related_terms"></div>
<div id="din_content"></div>
<div id="pagination"></div>